home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / tpapi.exe / NWPRINT.PA1 < prev    next >
Text File  |  1994-01-14  |  9KB  |  221 lines

  1. {#Z+}
  2. (*(10U&l12D(s4099T&k2S*)
  3. {***************************************************************************}
  4. {** Program : NWPRINT                                                     **}
  5. {***************************************************************************}
  6. {** Version : 1.53            ** Started : 11/11/91  ** Ended :   /  /    **}
  7. {***************************************************************************}
  8. {******************************** Description ******************************}
  9. {***************************************************************************}
  10. {** OOP library for Netware API                                           **}
  11. {**                                                                       **}
  12. {** This unit forms the second level object : PRINT                       **}
  13. {** This object is a descandent of          : NETWARE                     **}
  14. {**                                                                       **}
  15. {**                                                                       **}
  16. {**                                                                       **}
  17. {**                                                                       **}
  18. {***************************************************************************}
  19. {******************************** Information ******************************}
  20. {***************************************************************************}
  21. {** Provides Netware Printint Services                                    **}
  22. {**                                                                       **}
  23. {**                                                                       **}
  24. {**                                                                       **}
  25. {** This code is (c) 1991 - 1994 Antonio Covelli. ALL RIGHTS RESERVED.    **}
  26. {** Portions (c) Novell Inc,                                              **}
  27. {**                                                                       **}
  28. {**                                                                       **}
  29. {***************************************************************************}
  30.  
  31. {$I NETWARE.INC}
  32. {#Z-}
  33.  
  34. UNIT NWPRINT;
  35.  
  36. INTERFACE
  37.  
  38. USES
  39.  
  40.   nwvar,
  41.   netware;
  42.  
  43. TYPE
  44.  
  45.   PPrintOBJ = ^PrintOBJ;
  46.   PrintOBJ  = OBJECT (NetwareOBJ)
  47.  
  48.     { This object provides Netware Printing Services API's. }
  49.  
  50.     FUNCTION CancelLPTCapture : WORD;
  51.     { Cancels the redirection of the default LPT device. }
  52.  
  53.     FUNCTION CancelSpecificLPTCapture (LPTDevice : BYTE) : WORD;
  54.     { Cancels the redirection of the specified LPT device. }
  55.     {#F}
  56.     {}
  57.     { LPTDevice: 00h = LPT1 }
  58.     {            01h = LPT2 }
  59.     {            02h = LPT3 }
  60.     {#F}
  61.  
  62.     FUNCTION ENDLPTCapture : WORD;
  63.     { Ends the redirection of the default LPT device. The print job will then
  64.       be serviced by the print server. }
  65.  
  66.     FUNCTION ENDSpecificLPTCapture (LPTDevice : BYTE) : WORD;
  67.     { Ends the redirection of the specified LPT device. The print job will then
  68.       be serviced by the print server. }
  69.     {#F}
  70.     {}
  71.     { LPTDevice: 00h = LPT1 }
  72.     {            01h = LPT2 }
  73.     {            02h = LPT3 }
  74.     {#F}
  75.  
  76.     FUNCTION FlushLPTCapture : WORD;
  77.     { Flushes the data sent to the default LPT device. The print job will then
  78.       be serviced by the print server. The LPT device remains spooled and any
  79.       new data sent to the device will cause the creation of a new spool file. }
  80.  
  81.     FUNCTION FlushSpecificLPTCapture (LPTDevice : BYTE) : WORD;
  82.     { Flushes the data sent to the specified LPT device. The print job will then
  83.       be serviced by the print server. The LPT device remains spooled and any
  84.       new data sent to the device will cause the creation of a new spool file. }
  85.     {#F}
  86.     {}
  87.     { LPTDevice: 00h = LPT1 }
  88.     {            01h = LPT2 }
  89.     {            02h = LPT3 }
  90.     {#F}
  91.  
  92.     FUNCTION GetBannerUserName (var BannerUserName : TBannerUserName) : WORD;
  93.     { Returns the name that will appear on the banner page of print jobs. }
  94.     {#F}
  95.     {}
  96.     { BannerUserName: current name that appears on the banner page of jobs. }
  97.     {#F}
  98.  
  99.     FUNCTION GetSpecificCaptureFlags (LPTDevice : BYTE;
  100.                                       VAR CaptureFlags : Capture_Flags) : WORD;
  101.  
  102.     FUNCTION GetDefaultCaptureFlags   (VAR CaptureFlags : Capture_Flags) : WORD;
  103.  
  104.     FUNCTION GetDefaultLocalPrinter : BYTE;
  105.     { Returns the default LPT device: }
  106.     {#F}
  107.     {}
  108.     { LPTDevice: 00h = LPT1 }
  109.     {            01h = LPT2 }
  110.     {            02h = LPT3 }
  111.     {#F}
  112.  
  113.     FUNCTION GetLPTCaptureStatus (VAR LPTServerNumber : BYTE) : WORD;
  114.     { This call returns the status of the default LPT device. }
  115.     {#F}
  116.     {}
  117.     { LPTServerNumber: contains the connection id of the queueing server. }
  118.     {#F}
  119.  
  120.     FUNCTION GetPrinterQueue (PrinterNumber : BYTE;
  121.                               VAR QueueID : OT_BinderyID) : WORD;
  122.     { Returns the print queue ID associated with the printer number on a file
  123.       server. }
  124.     {#F}
  125.     {}
  126.     { PrinterNumber: number of printer to retrieve assigned print queue. }
  127.     { QueueID      : Object ID of the print queue assigned to the specified
  128.                 printer number. }
  129.     {#F}
  130.  
  131.     FUNCTION GetPrinterStatus (TargetNumber : BYTE; VAR PrinterHalted,
  132.                                PrinterOffLine, FormType,
  133.                                RedirectedPrinter : BYTE) : WORD;
  134.     { Allows a client to check the status of a shared printer. }
  135.     {#F}
  136.     {}
  137.     { TargetPrinter     : number of printer to get status for. }
  138.     { PrinterHalted     : $FF = printer halted   $00 = printer running. }
  139.     { PrinterOffline    : $FF = printer offline  $00 = printer online. }
  140.     { FormType          : contains the number of the form currently mounted. }
  141.     { RedirectedPrinter : should be the same as TargetPrinter. If different the
  142.                      console has redirected print jobs to this printer. }
  143.     {#F}
  144.  
  145.     FUNCTION GetPrinterStatus2 (TargetNumber : BYTE; VAR PrinterHalted,
  146.                                 PrinterOffLine, FormType,
  147.                                 RedirectedPrinter : BYTE) : WORD;
  148.     { Allows a client to check the status of a shared printer. }
  149.     {#F}
  150.     {}
  151.     { TargetPrinter     : number of printer to get status for. }
  152.     { PrinterHalted     : $FF = printer halted  $00 = printer running. }
  153.     { PrinterOffline    : $FF = printer offline $00 = printer online. }
  154.     { FormType          : contains the number of the form currently mounted. }
  155.     { RedirectedPrinter : should be the same as TargetPrinter. If different the
  156.                      console has redirected print jobs to this printer. }
  157.     {#F}
  158.  
  159.     FUNCTION SetBannerUserName (BannerUserName : TBannerUserName) : WORD;
  160.     { Sets the name that will appear on the banner page of print jobs. }
  161.     {#F}
  162.     {}
  163.     { BannerUserName: new name that will appear on the banner page of jobs. }
  164.     {#F}
  165.  
  166.     FUNCTION SetCapturePrintJob (LPTDevice : BYTE; JobNumber : WORD;
  167.                                  VAR JobFileHandle) : WORD;
  168.  
  169.     FUNCTION SetCapturePrintQueue (LPTDevice : BYTE; ConnectionID : WORD;
  170.                                    QueueID : OT_BinderyID) : WORD;
  171.  
  172.     FUNCTION SetDefaultCaptureFlags (CaptureFlags : Capture_Flags) : WORD;
  173.  
  174.     FUNCTION SetDefaultLocalPrinter (LPTDevice : BYTE) : WORD;
  175.     { Sets the default LPT device:}
  176.     {#F}
  177.     {}
  178.     { LPTDevice: 00h = LPT1 }
  179.     {            01h = LPT2 }
  180.     {            02h = LPT3 }
  181.     {#F}
  182.  
  183.     FUNCTION SetCaptureFlags (LPTDevice : BYTE;
  184.                               CaptureFlags : Capture_Flags) : WORD;
  185.  
  186.     FUNCTION SetSpoolFlags (PrintFlags : BYTE; TabSize, PrinterNumber,
  187.                             NumberOfCopies, FormType : WORD;
  188.                             BannerUserName : TBannerUserName) : WORD;
  189.  
  190.     FUNCTION SpecifyCaptureFile (DirectoryHandle : BYTE;
  191.                                  FilePath : TPathName) : WORD;
  192.     { Allows an application to send data directly to a permanent file residing
  193.       on a fileserver. When using this call DO NOT set any Capture settings.}
  194.     {#F}
  195.     {}
  196.     { DirectoryHandle: Directory handle pointing to a directory/volume. If
  197.                   specifying a full path then should be 0. }
  198.     { FilePath       : Path where the file should be created. Must include the
  199.                   filename. If DirectoryHandle is 0 then FilePath must include
  200.                   the volume name. eg. SYS1:\USERS\TONY\TEST.PRT. }
  201.     {#F}
  202.  
  203.     FUNCTION StartLPTCapture : WORD;
  204.     { Redirects the default LPT device to either a print queue or a permanent
  205.       data file depending on the Capture Flags. }
  206.  
  207.     FUNCTION StartSpecificLPTCapture (LPTDevice : BYTE) : WORD;
  208.     { Redirects the specified LPT device to either a print queue or a permanent
  209.       data file depending on the Capture Flags. }
  210.     {#F}
  211.     {}
  212.     { LPTDevice: 00h = LPT1 }
  213.     {            01h = LPT2 }
  214.     {            02h = LPT3 }
  215.     {#F}
  216.  
  217.     DESTRUCTOR  Done; VIRTUAL;
  218.  
  219.   END;
  220.  
  221.